import { defineConfig } from "umi";
import routes from "./routes";
import proxy from "./proxy";

export default defineConfig({
  proxy,
  routes,
  plugins: [
    // '@umijs/plugins/dist/antd',
    "@umijs/plugins/dist/dva",
    "@umijs/plugins/dist/model",
    // '@umijs/plugin-access'
  ],
  title: "Let'S 预约",
  mfsu: false,
  hash: true,
  metas: [
    {
      name: "viewport",
      content:
        "width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0",
    },
    { name: "keywords", content: "xxx" },
    {
      name: "description",
      content: "xxxx",
    },
    { name: "renderer", content: "webkit|ie-comp|ie-stand" },
    { "http-equiv": "X-UA-Compatible", content: "ie=edge,chrome=1" },
    { "http-equiv": "Cache-Control", content: "no-cache" },
    { "http-equiv": "Pragma", content: "no-cache" },
    { "http-equiv": "Expires", content: "0" },
  ],
  links: [
    {
      rel: "icon",
      href: "/logo.jpg",
    },
  ],
  esbuildMinifyIIFE: true,
  headScripts: [
    `window._AMapSecurityConfig = {
      securityJsCode:'c680fcb693df90cab245e08843cd407b'
    }`,
    "https://webapi.amap.com/maps?v=2.0&key=8dbfa31574549f4da060da46dd6af165&plugin=AMap.Geocoder,AMap.AutoComplete,AMap.PlaceSearch,AMap.PolygonEditor,AMap.MarkerClusterer",
    'https://webapi.amap.com/ui/1.1/main.js?v=1.1.1"',
    "https://map.qq.com/api/js?v=2.exp&key=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77",
    // 'https://cache.amap.com/lbs/static/PlaceSearchRender.js',
    // 'https://cache.amap.com/lbs/static/addToolbar.js'
  ],
  // access: {},
  // initialState: {},
  // models: {},
  dva: {},
  // request: {},
  npmClient: "pnpm",
  // nodeModulesTransform: {
  //   type: "none",
  // },
  fastRefresh: true,
  deadCode: {},
});
